import assessCheckApi from './api'
import { axios } from '@/utils/request'
import router from '@/router/index'
import blobType from '@/common/blobType'
var menuType = blobType.menuType
var fywflcodeArr = blobType.fywflcodeArr
var fywflcode = ''

export function spcyMyInfoQueryMyJbxx(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url: assessCheckApi.spcyMyInfoQueryMyJbxx,
    method:'get' ,
    params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside',
    // responseType: 'arraybuffer'
  })
}

export function myJbxxUpdateUser(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url: assessCheckApi.myJbxxUpdateUser,
    method:'post' ,
    data:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside',
  })
}

export function myJbxxdownMyQm(params){
  return axios({
    url: assessCheckApi.myJbxxdownMyQm,
    method: "get",
    params:params,
    url_1:'outside',
    responseType:'blob',
  });
}

export function myJbxxuploadMyQm(data){
  return axios({
    url:assessCheckApi.myJbxxuploadMyQm,
    method: "post",
    data:data,
    url_1:'outside',
    responseType: 'arraybuffer'
  });
};

export function resetHcyPwd(params){
  return axios({
    url:assessCheckApi.resetHcyPwd,
    method: "get",
    params:params,
    url_1:'outside',
  });
};

export function modifyHcyAccount(data){
  return axios({
    url:assessCheckApi.modifyHcyAccount,
    method: "put",
    data:data,
    url_1:'outside',
  });
};

export function modifyHcyGzzt(data){
  return axios({
    url:assessCheckApi.modifyHcyGzzt,
    method: "put",
    data:data,
    url_1:'outside',
  });
};

export function ocalityPostAction(data) {
  return axios({
    url: assessCheckApi.dict,
    method:'get' ,
    params:data,
    url_1:'outside'
  })
}


// 下载培训记录-导入模板
export function sysUserPxjldownUserPxjlTemplate(params) {
  return axios({
    url: assessCheckApi.sysUserPxjldownUserPxjlTemplate,
    method: "GET",
    params,
    responseType: 'arraybuffer',
    url_1:'outside'
  });
};

// 导出培训记录数据-表格excel
export function sysUserPxjlexportUserPxjlData(params) {
  return axios({
    url: assessCheckApi.sysUserPxjlexportUserPxjlData,
    method: "GET",
    params,
    responseType: 'arraybuffer',
    url_1:'outside'
  });
};


// 导入培训记录
export function sysUserPxjlimpPxjlData(data) {
  return axios({
    url: assessCheckApi.sysUserPxjlimpPxjlData,
    method: "POST",
    data,
    url_1:'outside',
    responseType: 'arraybuffer',
  });
};



// 用户培训记录-添加
export function sysUserPxjladdPxjl(data) {
  return axios({
    url: assessCheckApi.sysUserPxjladdPxjl,
    method: "POST",
    data,
    url_1:'outside'
  });
};

// 用户培训记录-批量删除
export function sysUserPxjldeleteBatch(data) {
  return axios({
    url: assessCheckApi.sysUserPxjldeleteBatch,
    method: "delete",
    params:data,
    url_1:'outside'
  });
};

// 用户培训记录-编辑
export function sysUserPxjleditPxjl(data) {
  return axios({
    url: assessCheckApi.sysUserPxjleditPxjl,
    method: "put",
    data,
    url_1:'outside'
  });
};

// 用户培训记录-通过id查询
export function sysUserPxjlqueryById(data) {
  return axios({
    url: assessCheckApi.sysUserPxjlqueryById,
    method: "GET",
    params:data,
    url_1:'outside'
  });
};
// 查看培训记录-相关文件
export function sysUserPxjlqueryPxjlFileList(data) {
  return axios({
    url: assessCheckApi.sysUserPxjlqueryPxjlFileList,
    method: "GET",
    params:data,
    url_1:'outside'
  });
};
// 培训记录文件-上传
export function sysUserPxjluploadPxjlFile(data) {
  return axios({
    url: assessCheckApi.sysUserPxjluploadPxjlFile,
    method: "POST",
    data,
    url_1:'outside',
    responseType: 'arraybuffer'
  });
};
// 培训记录文件-删除
export function sysUserPxjldeletePxjlFileById(data) {
  return axios({
    url: assessCheckApi.sysUserPxjldeletePxjlFileById,
    method: "delete",
    params:data,
    url_1:'outside'
  });
};
// 培训记录文件-下载
export function sysUserPxjlgetPxjlFile(data) {
  return axios({
    url: assessCheckApi.sysUserPxjlgetPxjlFile,
    method: "get",
    params:data,
    url_1:'outside'
  });
};


export function updateHcy(data) {
  return axios({
    url: assessCheckApi.updateHcy,
    method: "post",
    data,
    url_1:'outside'
  });
};

export function modifyHcySsk(data) {
  return axios({
    url: assessCheckApi.modifyHcySsk,
    method: "put",
    data,
    url_1:'outside'
  });
};

export function modifyHcyState(data) {
  return axios({
    url: assessCheckApi.modifyHcyState,
    method: "put",
    data,
    url_1:'outside'
  });
};

//工作经历
export function sysUserGzjladdGzjl(params) {//添加工作经历
  return axios({
    url: assessCheckApi.sysUserGzjladdGzjl,
    method: "post",
    data:params,
    url_1:'outside'
  })
}
export function sysUserGzjldeleteBatch(params) {//删除工作经历
  return axios({
    url: assessCheckApi.sysUserGzjldeleteBatch,
    method: "delete",
    params:params,
    url_1:'outside'
  })
}
export function sysUserJyjldeleteBatch(params) {//删除工作经历
  return axios({
    url: assessCheckApi.sysUserJyjldeleteBatch,
    method: "delete",
    params:params,
    url_1:'outside'
  })
}

export function sysUserGzjldownUserGzjlTemplate(params) {//导出工作经历模板
  return axios({
    url: assessCheckApi.sysUserGzjldownUserGzjlTemplate,
    method: "get",
    params:params,
    url_1:'outside',
    responseType: 'arraybuffer',
  })
}
export function sysUserGzjleditGzjl(params) {//编辑工作经历
  return axios({
    url: assessCheckApi.sysUserGzjleditGzjl,
    method: "put",
    data:params,
    url_1:'outside'
  })
}
export function sysUserGzjlexportUserGzjlData(params) {//导出工作经历
  return axios({
    url: assessCheckApi.sysUserGzjlexportUserGzjlData,
    method: "get",
    params:params,
    url_1:'outside',
    responseType: 'arraybuffer',
  })
}
export function sysUserGzjlimpGzjlData(params) {//导入工作经历
  return axios({
    url: assessCheckApi.sysUserGzjlimpGzjlData,
    method: "get",
    params:params,
    url_1:'outside',
    responseType: 'arraybuffer',
  })
}
export function sysUserGzjlqueryById(params) {//id查询工作经历
  return axios({
    url: assessCheckApi.sysUserGzjlqueryById,
    method: "get",
    params:params,
    url_1:'outside'
  })
}



export function sysUserPxjlgetPxxs(params) {//id查询工作经历
  return axios({
    url: assessCheckApi.sysUserPxjlgetPxxs,
    method: "get",
    params:params,
    url_1:'outside'
  })
}

export function userBgsqsaveBgsqInGzdw(params) {//id查询工作经历
  return axios({
    url: assessCheckApi.userBgsqsaveBgsqInGzdw,
    method: "get",
    params:params,
    url_1:'outside'
  })
}
export function userBgsquploadile(params) {//编辑工作经历
  return axios({
    url: assessCheckApi.userBgsquploadile,
    method: "post",
    data:params,
    url_1:'outside'
  })

}
export function userBgsqreplaceFile(params) {//编辑工作经历
  return axios({
    url: assessCheckApi.userBgsqreplaceFile,
    method: "post",
    data:params,
    url_1:'outside'
  })
}

export function userBgsqqueryBgsqInfo(params) {//id查询工作经历
  return axios({
    url: assessCheckApi.userBgsqqueryBgsqInfo,
    method: "get",
    params:params,
    url_1:'outside'
  })
}

export function webOfficeApiopenFile(parameter) {
  return axios({
    url:assessCheckApi.webOfficeApiopenFile,
    method: 'get',
    params: parameter,
    url_1:'outside'
  })
}

export function userBgsqdownloadFile(params) {
  return axios({
    url: assessCheckApi.userBgsqdownloadFile,
    method: "get",
    params:params,
    url_1:'outside',
    responseType: 'arraybuffer',
  })
}


export function userBgsqsubmitBgsqInGzdw(parameter) {
  return axios({
    url:assessCheckApi.userBgsqsubmitBgsqInGzdw,
    method: 'get',
    params: parameter,
    url_1:'outside'
  })
}
export function userBgsqsubmitShInBgGzdw(parameter) {
  return axios({
    url:assessCheckApi.userBgsqsubmitShInBgGzdw,
    method: 'get',
    params: parameter,
    url_1:'outside'
  })
}


export function sysUserJyjladdJyjl(params) {
  return axios({
    url: assessCheckApi.sysUserJyjladdJyjl,
    method: "post",
    data:params,
    url_1:'outside'
  })
}

export function sysUserJyjleditJyjl(params) {
  return axios({
    url: assessCheckApi.sysUserJyjleditJyjl,
    method: "put",
    data:params,
    url_1:'outside'
  })
}

export function jcylxdjcjjszcList(params){
  return axios({
    url: assessCheckApi.jcylxdjcjjszcList,
    method:'get' ,
    params:params,
    url_1:'outside'
  })
}

export function jcylxdjcjgetUserSignPhotoLink(params){
  return axios({
    url: assessCheckApi.jcylxdjcjgetUserSignPhotoLink,
    method:'get' ,
    params:params,
    url_1:'outside'
  })
}
export function jcylxdjcjuploadMyPhoto(params){
  return axios({
    url: assessCheckApi.jcylxdjcjuploadMyPhoto,
    method:'post' ,
    data:params,
    url_1:'outside',
  })
}
export function jcylxdjcjuploadMyQm(params){
  return axios({
    url: assessCheckApi.jcylxdjcjuploadMyQm,
    method:'post' ,
    data:params,
    url_1:'outside',
  })
}
// 科研成果
export function addFbwz(params){
  return axios({
    url: assessCheckApi.addFbwz,
    method:'post' ,
    data:params,
    url_1:'outside',
  })
}
export function deleteFbwz(params){
  return axios({
    url: assessCheckApi.deleteFbwz,
    method:'delete' ,
    params:params,
    url_1:'outside'
  })
}
export function editFbwz(data){
  return axios({
    url:assessCheckApi.editFbwz,
    method: "put",
    data:data,
    url_1:'outside',
  });
};
export function queryByIdFbwz(params){
  return axios({
    url: assessCheckApi.queryByIdFbwz,
    method:'get' ,
    params:params,
    url_1:'outside'
  })
}
// 奖励惩罚情况
export function addJcqk(params){
  return axios({
    url: assessCheckApi.addJcqk,
    method:'post' ,
    data:params,
    url_1:'outside',
  })
}
export function deleteBatchJlcfqk(params){
  return axios({
    url: assessCheckApi.deleteBatchJlcfqk,
    method:'delete' ,
    params:params,
    url_1:'outside'
  })
}
export function editJcqk(data){
  return axios({
    url:assessCheckApi.editJcqk,
    method: "put",
    data:data,
    url_1:'outside',
  });
};
export function queryByIdJlcfqk(params){
  return axios({
    url: assessCheckApi.queryByIdJlcfqk,
    method:'get' ,
    params:params,
    url_1:'outside'
  })
}

export function zyzgkqaddZyjszz(params){
  return axios({
    url: assessCheckApi.zyzgkqaddZyjszz,
    method:'post' ,
    data:params,
    url_1:'outside',
  })
}
export function zyzgkqaddKyxm(params){
  return axios({
    url: assessCheckApi.zyzgkqaddKyxm,
    method:'post' ,
    data:params,
    url_1:'outside',
  })
}
export function zyzgkqaddYjypqk(params){
  return axios({
    url: assessCheckApi.zyzgkqaddYjypqk,
    method:'post' ,
    data:params,
    url_1:'outside',
  })
}
export function zyzgkqupdateZyzgky(params){
  return axios({
    url: assessCheckApi.zyzgkqupdateZyzgky,
    method:'post' ,
    data:params,
    url_1:'outside',
  })
}
export function zyzgkqdeleteBatch(params){
  return axios({
    url: assessCheckApi.zyzgkqdeleteBatch,
    method:'delete' ,
    params:params,
    url_1:'outside'
  })
}









